package com.atguigu.domain;


import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author dl
 * @create 2020-04-25-14:05
 */
public class Book implements Serializable {

	private static final long serialVersionUID = 1L;

	private int id;
	private String name;
	private String author;
	private BigDecimal price;
	private int sales;
	private int stock;
	private String imgPath = "static/img/default.jpg";	

	public Book() {
	}

	public Book(int id, String name, String author, BigDecimal price, int sales, int stock, String imgPath) {
		this.id = id;
		this.name = name;
		this.author = author;
		this.price = price;
		this.sales = sales;
		this.stock = stock;
		this.imgPath = imgPath;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the author
	 */
	public String getAuthor() {
		return author;
	}

	/**
	 * @param author
	 */
	public void setAuthor(String author) {
		this.author = author;
	}

	/**
	 * @return the price
	 */
	public BigDecimal getPrice() {
		return price;
	}

	/**
	 * @param price
	 */
	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	/**
	 * @return the sales
	 */
	public int getSales() {
		return sales;
	}

	/**
	 * @param sales
	 */
	public void setSales(int sales) {
		this.sales = sales;
	}

	/**
	 * @return the stock
	 */
	public int getStock() {
		return stock;
	}

	/**
	 * @param stock
	 */
	public void setStock(int stock) {
		this.stock = stock;
	}

	/**
	 * @return the imgPath
	 */
	public String getImgPath() {
		return imgPath;
	}

	/**
	 * @param imgPath
	 */
	public void setImgPath(String imgPath) {
		this.imgPath = imgPath;
	}

	@Override
	public String toString() {
		return "Book{" +
				"id=" + id +
				", name='" + name + '\'' +
				", author='" + author + '\'' +
				", price=" + price +
				", sales=" + sales +
				", stock=" + stock +
				", imgPath='" + imgPath + '\'' +
				'}';
	}
}
